﻿using Pap.Core.Utilities;
using Pap.Data;
using Pap.Web.Utils;

namespace Pap.Web.Modules.Loan.ViewModel
{
    /// <summary>
    /// 
    /// </summary>
    public class RecipteViewModel : IViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        private IAdministrationRepository _AdmininstationRepository;
        /// <summary>
        /// Initializes a new instance of the <see cref="RecipteViewModel"/> class.
        /// </summary>
        /// <param name="adminRepo">The admin repo.</param>
        public RecipteViewModel(IAdministrationRepository adminRepo)
        {
            _AdmininstationRepository = adminRepo;
        }

        /// <summary>
        /// Gets the recipte image URL.
        /// </summary>
        /// <returns></returns>
        internal string GetRecipteImageUrl()
        {
            return "/image.route?Path=" + _AdmininstationRepository.GetSettingValue(RegistryInfo.CommitteeID,
                                                             SettingKeys.ReceipteImagePath);
        }
    }
}
